<template>
  <div class="child">
    <h1>我是Child组件(子)</h1>
      <h1>sum:{{ sum }}</h1>
  </div>
</template>
  
  <script>
import { ref } from 'vue';
export default {
  name: "child",
  async setup(){
    let sum = ref(0)
    let p=new Promise((resolve,reject)=>{
      setTimeout(() => {
        resolve({sum})
      }, 3000);
    })
    return await p;
  }
 
};
</script>
  
  <style>
.child {
  background-color: skyblue;
  padding: 10px;
}
</style>